<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>绩效分数-目的地运营集团数据管理平台</title>
<include file="Include:style" />
<style>
	.folder span{ display: inline-block; margin: 0 40px 0 1px; }
</style>
</head>
<body>
<include file="Include:header" />
<include file="Include:left" />
<div id="main">
	<div class="crumbs">
		<div class="crumbs-text">人事 > 绩效分数</div>
	</div>
	<div id="content">
		<div class="classify">
			<ul>
				<li><a href="javascript:;" class="current">绩效分数</a></li>
				<li><a href="__APP__/Hr/jixiao_user">考评人员</a></li>
			</ul>
		</div>
		<div class="filter">
			<div>
				<div class="filter-title">类型</div>
				<ul class="filter-order">
					<foreach name="list" item="vo">
					<li <if condition="$type eq $vo['name1']">class="current"</if>>
						<a href="__APP__/Hr/jixiao_personal/type/{$vo['name1']}/msum/{$msum}">{$vo['name2']}</a>
					</li>
					</foreach>
				</ul>
			</div>
			<div>
				<div class="filter-title">去除满分</div>
				<ul class="filter-order">
					<li <if condition="$msum eq -1">class="current"</if>>
						<a href="__APP__/Hr/jixiao_personal/type/{$type}/msum/-1">不去除</a>
					</li>
					<li <if condition="$msum eq 1">class="current"</if>>
						<a href="__APP__/Hr/jixiao_personal/type/{$type}/msum/1">去除</a>
					</li>
				</ul>
			</div>
		</div>
		<div class="table-scrollx">
			<table class="table table-bordered table-hover">
				<tr class="table-header fixed-table-header">
					<td width="5%">
						<select name="uid" class="w90">
							<option value="-10" <if condition="-10 eq $uid">selected</if>>姓名</option>
							<foreach name="user" item="u">
							<option value="{$u['uid']}" <if condition="$u['uid'] eq $uid">selected</if>>{$u['username']}</option>
							</foreach>
						</select>
					</td>
					<td>中心</td>
					<td>部门</td>
					<if condition="$type eq 5 or $type eq 6 or $type eq -10"><td width="20%">PBC</td></if>
					<td width="10%">领导考评</td>
					<td width="20%">公司内述职评分</td>
					<td width="10%">360度平均分</td>
					<td width="10%">总分</td>
				</tr>
				<foreach name="result" item="vo">
				<tr>
					<td width="">{$vo['username']}</td>
					<td>{$vo['center_name']}</td>
					<td>{$vo['department_name']}</td>
					<if condition="$type eq 5 or $type eq 6 or $type eq -10">
					<td>
						<if condition="$vo['sup3'] eq 1">
						<input type="text" name="sum3" class="form-control required-text w100 Text_c" autocomplete="off" mid="{$vo['id']}" action="three" value="{$vo['sum3']}" maxlength="5">
						<span class="error-item">范围为0-100</span>
						</if>
					</td>
					</if>
					<td><span data-toggle="tooltip" data-placement="right" title="" data-html="true" data-original-title="已评:<if condition="$vo['sum1_yp'] eq NULL">无<else/>{$vo['sum1_yp']}</if><br>未评:<if condition="$vo['sum1_wp'] eq NULL">无<else/>{$vo['sum1_wp']}</if>">{$vo['sum1']}</span><if condition="$vo['sum1_yp'] neq NULL"><a href="__APP__/Index/jixiao_person/id/{$vo['id']}/standard/standard1" target="_blank">(详细)</a></if></td>
					<td>
						<input type="text" name="sum4" class="form-control required-text w100 Text_c" autocomplete="off" mid="{$vo['id']}" action="four" value="{$vo['sum4']}" maxlength="5">
						<span class="error-item">范围为0-100</span>
					</td>
					<td><span data-toggle="tooltip" data-placement="right" title="" data-html="true" data-original-title="已评:<if condition="$vo['sum2_yp'] eq NULL">无<else/>{$vo['sum2_yp']}</if><br>未评:<if condition="$vo['sum2_wp'] eq NULL">无<else/>{$vo['sum2_wp']}</if>">{$vo['sum2']}</span><if condition="$vo['sum2_yp'] neq NULL"><a href="__APP__/Index/jixiao_person/id/{$vo['id']}/standard/standard2" target="_blank">(详细)</a></if></td>
					<td>{$vo['sum']}</td>
				</tr>
				</foreach>
			</table>
		</div>
	</div>
</div>
<include file="Include:javascript"/>
<script type="text/javascript">
$(function(){
	$("[name=uid]").change(function(){
		var val = $(this).val();
		window.location.href = "__APP__/Hr/jixiao_personal/type/{$type}/msum/{$msum}/uid/"+val;
	});
	$(".required-text").blur(function(){
		var sum=$(this).val(),
			action=$(this).attr('action'),
			mid=$(this).attr('mid');
		if(!/^(\d|[1-9]\d|100)(\.\d{1,2})?$/.test(sum) && sum!=""){
			$(this).next('.error-item').show();
		}else if(sum!=""){
			$(this).next('.error-item').hide();
			$.ajax({
				type:"POST",
				dataType:"json",
				global:false,
				url:"__APP__/Hr/jixiao_personal_ajax",
				data:{"sum":sum,"action":action,"id":mid}
			});
		}
	});
});
</script>
</body>
</html>